<?php
/**
 * 全局配置文件
 * 
 */
 
class config {
	/**
	 * uri常量
	 */
	const BASEURL = 'http://localhost/beautyos/';
	const SYSTEMURL = 'http://localhost/beautyos/system/';
	const INDEXURL = 'http://localhost/beautyos/index.php/';
	const VIEWURL = 'http://localhost/beautyos/system/view';
	const VENTOR = 'http://localhost/beautyos/system/ventor/';
	
	/**
	 * 数据库常量
	 *
	 */
	const DBTYPE = 'mysqli';
	const DBHOST = 'localhost';
	const DBUSER = 'root';
	const DBPASS = 'data';
	const DBNAME = 'beauty';
	/**
	 * 默认的控制器和函数
	 */
	const DEFAULT_CONTROL = 'desktop';
	const DEFAULT_FUNCTION = 'index';
	
	/**
	 * 控制器
	 */
	public static $control = array('desktop','fileManager','login','fileUpload','rss','notepad','imageView','app');//控制器类
	
	/**
	 * 自动加载的类
	 */
	public static $autoClass = array(
							'input' => 'input',
							'output' => 'output',
							'session' =>'session',
							'uri' => 'URI'
							);
							
	/**
	 * smarty模板路径配置
	 * 
	 */
	const TEMPLATE_DIR = 'view/template';
	const COMPILE_DIR = 'view/compile';
	const CONFIG_DIR = 'view/config';
	const CACHE_DIR = 'view/cache';

	/**
	 * 上传文件的类型
	 *
	 */
	public static $upload_allowed = array('text/plain',
										  'zip/tar','zip/rar','zip/zip','zip/gz',
										  'office/doc','office/xls','office/ppt',
										  'image/gif','image/jpg','image/jpeg','image/png','image/bmp',
										  'flash/swf',
										  'pdf/pdf',
										  'rar/rar','rar/zip',
										  'text/txt',
										  );
	const UPLOAD_SIZE = '204800';
	const UPLOAD_DIR =  '/beautyos/user/';
	const DESKTOP_THUMBNAILS_IMAGE_PATH = '/var/www/beautyos/system/view/desktop/wallpapers/thumbnails';
	const DESKTOP_IMAGE_PATH =  '/beautyos/system/view/desktop/wallpapers/';
	
	public static $file_ext = array('.gif','.jpeg','.jpg','.png','.bmp',
									'.txt','.doc','.xsl',
									'.php','.html');
	
	public static $image_app = array('.gif','.jpeg','.jpg','.png','.bmp');
	public static $word_app = array('.txt','.doc');
}
?>
